<script lang="ts">
import {defineComponent, h} from "vue"
import DataCard from "@/components/DataCard.vue";
import ViewForm from "@/components/DynamicForm/ViewForm.vue"
import bus from "@/units/bus"

export default defineComponent({
  props: {
    api: {
      type: String,
      required: true
    }
  },
  setup(props) {
    return () => h(DataCard, {
      style: {
        paddingRight: 'calc(100% - 820px)'
      }
    }, [
      h(ViewForm, {
        api: props.api,
        onSuccess: () => bus.emit('reload-configure')
      })
    ])
  }
})
</script>